package logic

import (
	"context"
	"jd-mall/jd-srv/model"

	"jd-mall/jd-srv/internal/svc"
	"jd-mall/jd-srv/jd"

	"github.com/zeromicro/go-zero/core/logx"
)

type ShowDelLogic struct {
	ctx    context.Context
	svcCtx *svc.ServiceContext
	logx.Logger
}

func NewShowDelLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ShowDelLogic {
	return &ShowDelLogic{
		ctx:    ctx,
		svcCtx: svcCtx,
		Logger: logx.WithContext(ctx),
	}
}

// 商品移除
func (l *ShowDelLogic) ShowDel(in *jd.ShowDelRequest) (*jd.ShowDelResponse, error) {
	// todo: add your logic here and delete this line
	var shop model.Shop
	model.DB.Where("id=?", in.Id).Delete(&shop)
	return &jd.ShowDelResponse{}, nil
}
